<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@include file="/context/mytags.jsp" %>
<t:base type="jquery,easyui,tools"></t:base>
<div id="main_typegroup_list" class="easyui-layout" fit="true">
  <div region="center" style="padding: 1px;">
    <t:datagrid name="parentCommentDatagrid" title=""  fitColumns="false" actionUrl="questionsController.do?parentCommentDatagrid&commId=${commentId}" fit="true" idField="commentId"
                queryMode="group" onLoadSuccess="loadSuccess" sortOrder="desc" sortName="createTime">
      <t:dgCol title="id" field="commentId" hidden="true"></t:dgCol>
      <%--<t:dgCol title="资产名称"   field="assetInfo.name" sortable="false" query="true" ></t:dgCol>--%>
      <t:dgCol title="回复人"   field="consumer.nickname" ></t:dgCol>
      <t:dgCol title="回复时间"  formatter="yyyy-MM-dd hh:mm:ss" field="createTime"></t:dgCol>
      <t:dgCol title="回复内容"  field="content"  extendParams="formatter:f_substring;" ></t:dgCol>

      <t:dgCol title="common.operation" field="opt" ></t:dgCol>
      <%--<t:dgFunOpt title="回复详情" exp="replyNum#ne#0" funname="f_openDetail(commentId)"></t:dgFunOpt>--%>

      <t:dgFunOpt funname="f_del(commentId)" title="删除" operationCode="delOperation"></t:dgFunOpt>

      <%--<t:dgToolBar title="修改" operationCode="editOperation" langArg="common.user" icon="icon-edit" url="applyAssetController.do?applyAssetDetailAddorupdate" width="380" height="200" funname="f_updateApplyAssetDetail"></t:dgToolBar>--%>
    </t:datagrid>
  </div>
</div>


<script type="text/javascript">

  $(function() {
  });




  function loadSuccess() {


  }

  function f_del(commentId){
    var url="questionsController.do?parentCommentDel&id=" + commentId;

//    doSubmit(url,"parentCommentDatagrid");
    createdialogByParent("删除","是否确定删除?",url,"parentCommentDatagrid");
//    createdialog("删除"," ?",url,"parentCommentDatagrid");

//    $.dialog.confirm("是否确定删除?", function(){
//
//      rowid = '';
//    }, function(){
//    }).zindex();
  }

  function f_substring(val,row){
    var newVal = val;
    if(val.length > 20){

      newVal = val.substring(0,20) + "...";
    }

    return "<span title='"+val+"'> " + newVal + " </span>";
  }


</script>
